<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h1 id="title">{{title}}</h1>
    <div id="content">{{content}}</div>
</body>
<script src="./js/zepto.js"></script>
<script>
    Zepto(function(){
        // 去掉nid
        let nid = localStorage.getItem("nid");
        // http://tt.linweiqin.com/api/tt/getArticleById
        $.ajax({
            type:"post",
            data:{
                nid:nid
            },
            url:"http://tt.linweiqin.com/api/tt/getArticleById",
            dataType:"json",
            success(data, status, xhr) {
                let article = data.article;
                console.log(article);
                $("#title").html(article.title);
                $("#content").html(article.content);

            }

        })
    })
</script>
</html>